<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	request.setCharacterEncoding("UTF-8");
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台登陆界面</title>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/css/login1.css" />
<link href="${pageContext.request.contextPath }/css/style.css"
	rel="stylesheet" type="text/css" />

<script src="${pageContext.request.contextPath }/js/jquery-1.8.3.js"></script>
<script src="${pageContext.request.contextPath }/js/js.js"></script>
<script src="${pageContext.request.contextPath }/js/cloud.js"
	type="text/javascript"></script>
<script type="text/javascript">
	$(function() {
		$('.loginbox').css({
			'position' : 'absolute',
			'left' : ($(window).width() - 692) / 2
		});
		$(window).resize(function() {
			$('.loginbox').css({
				'position' : 'absolute',
				'left' : ($(window).width() - 692) / 2
			});
		})
	});
	function change() {
		var img = document.getElementById("checkImg");
		img.src = "${pageContext.request.contextPath}/checkImg.action?"
				+ new Date();
	}
	function validate() {
		var username = document.getElementById("username").value;
		var password = document.getElementById("password").value;
		if (username == null || username == '') {
			alert("用户名不能为空");
			return false;
		}
		if (password == null || password == '') {
			alert("密码不能为空");
			return false;
		}
		return true;
	}
</script>
</head>
<body>
	<div id="login">
		<h1>Login</h1>


		<form method="post"
			action="${pageContext.request.contextPath }/adminUser_login.action"
			target="_parent" name='theForm' onsubmit="return validate();">
			<table>
				<tr>
					<td><input name="username" type="text" class="loginuser"
						value="${adu.username}" onclick="JavaScript:this.value=''" /></td>
				</tr>
				<tr>
					<td><input name="password" type="password" class="loginpwd"
						value="${adu.password}" onclick="JavaScript:this.value=''" /></td>
				</tr>
				<tr>
					<td><input type="text" id="captcha" name="checkImg"
						style="background-color: #ECF5FF; height: 30px; width: 100px; margin-top: 4px; border: 2px;"
						class="text captcha" maxlength="4" autocomplete="off" /><img
						id="checkImg" class="captchaImage" style="margin-left: 30px;"
						src="${pageContext.request.contextPath}/checkImg.action"
						title="点击更换验证码" onclick="change()"></span></td>
				</tr>
				<tr>
					<td><input type="hidden" name="act" value="signin" /> <input
						type="submit" class="loginbtn" value="登录" onclick="validate()" /><span
						style="color: red;">${message}</span></td>
				</tr>

			</table>
		</form>
	</div>
</body>
</html>
